﻿Public Class nonLgoinMyProfile
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        'I think the login website makes users confuse, maybe they think 'why I have to login? What is this for?".
        'This page is for the non-login users. If they want to comment or add tag, then they can login.
        'This page can make user better understand why they have to login.

        If User.Identity.IsAuthenticated Then       'The 'IsAuthenticated' is to valid user has authentication or not, and it will return 'true' or 'false'. 
            'In other word, it can valid user login or not.
            Response.Redirect("MyProfile.aspx?dinerID=" & User.Identity.Name)    'If it is return 'true', in other word, the user has logged in. It will take user to the 'Details.aspx?ID=...'
        End If

    End Sub

End Class